#pragma once
#include "Runtime/BattleFirePrefix.h"
#ifdef ALICE_JS_CEF_PORT
#include "include/cef_v8.h"
void ExportToJSCEF(CefRefPtr<CefV8Value> inScope);
#define ExportRealEngine(x) do{ExportToJSCEF(x);}while(0)
#define DeclareOnJSCall() virtual bool Execute(const CefString& name, \
            CefRefPtr<CefV8Value> object, \
            const CefV8ValueList& arguments, \
            CefRefPtr<CefV8Value>& retval, \
            CefString& exception) override; 

#define DefineJSBridge(x) class x : public CefV8Handler
#define BasicBody(x) public : \
        virtual bool Execute(const CefString& name, \
            CefRefPtr<CefV8Value> object, \
            const CefV8ValueList& arguments, \
            CefRefPtr<CefV8Value>& retval, \
            CefString& exception) override; \
        static void Export(CefRefPtr<CefV8Value> inScope); \
        IMPLEMENT_REFCOUNTING(x)
#else
#define ExportRealEngine(x)
#endif